Add Book to My BookshelfPurchase This Book Online

Chapter 18 - Hot Standby Router Protocol (HSRP)

Cisco & IP Addressing
Louis D. Rossi, Louis R. Rossi and Thomas Rossi
  Copyright © 1999 The McGraw-Hill Companies, Inc.

Chapter 18: Hot Standby Router Protocol (HSRP)
Objectives
  Describe ARP.
  Describe the concept of HSRP.
  Configure HSRP.
  Describe the configuration of a Windows workstation.
Address Resolution Protocol (ARP)
In Chapter 1 we stated that communication between and among hosts takes place by using MAC addresses.
How does a host learn its own MAC address?
When a NIC is installed in a device, the device will read the BIA address from the NIC and place it into RAM. At that point the device knows its own MAC address.
How does a device learn the MAC address of the intended destination?
In the world of IP, this feat is accomplished by using the Address Resolution Protocol (ARP).
Refer to Figure 18.1. Let us assume that Workstation A at 192.68.5.17 has a data packet with the destination address of 172.35.6.4, which is Workstation B. For this communication to be successful Workstation A must go off its own network.
For Workstation A to go off its own network it must be configured with a default gateway. In our case the default gateway will be the E0 interface of Router_A; the IP address of the E0 interface is 192.68.5.19.
Workstation A will send an ARP request in the form of a broadcast out on to the Ethernet. All hosts connected to the Ethernet will see the broadcast, but only the host with the IP address of 192.68.5.19 will reply. Refer to Figures 18.2 and 18.3.
Figures 18.2 and 18.3 illustrate an ARP request and reply respectively. In this case Workstation A is seeking the MAC address of 192.68.5.19.
All Fs on the second line of Figure 18.2 signify a broadcast. Notice also the all 0s for the destination MAC address.
Figure 18.3 illustrates Router_A responding to the ARP request with an ARP reply that includes the MAC address of its E0 interface.
Figure 18.1  Please provide a caption.
Figure 18.2  ARP Request
Figure 18.3  ARP Reply
From the ARP reply, Workstation A now knows the MAC address of the default gateway is:
00-80-C7-CA-0A-8A
At this point Workstation A can send the data packet to Workstation B. But this is a step-by-step process. When Router_A receives the data packet, Router_A will switch the packet to the E1 interface. At that point Router_A may have to send an ARP request out the E1 interface to find the MAC address of Workstation B. If previous communication has occurred it may not be necessary to send an ARP; Router_A may have the MAC address stored in its ARP cache.
As data packets travel across the internetwork the IP addresses of source and destination will never change, but the MAC address will always change to reflect the current source and destination.
When a host is configured to use the IP protocol three pieces of information are required:
  IP address
  Address mask
  Default gateway
In some cases it is critical for the workstation or host to have continuous access to the network. HSRP provides a backup router to act as a default gateway.
The Concept
Refer to Figure 18.4. Cisco’s Hot Standby Router Protocol (HSRP) provides Workstation A with a backup router in case its default gateway goes down. HSRP creates a virtual router with a virtual MAC address and a virtual IP address.
Many students have suggested that Windows 95 has this feature. While it is true that we can add multiple default gateways, this feature is only used at boot-up time. In other words, the host will use ARP for the first default gateway on the list; if that ARP fails it will continue down the list.
What happens when the host has successfully found the default gateway and it subsequently dies? The host will need to be re-booted.
HSRP solves this problem because it is dynamic; if the primary router dies, the secondary will take over and the host will never know the difference.
Now we should take a look at the following scenario.
Figure 18.4  HSRP Topology
Configuring HSRP
In the following configurations Router_A will be the active router, meaning Router_A will assume all packet transfers. Router_B will be the standby router. Router_B will be ready to assume packet transfer responsibilities if Router_A goes down.
Router_A has been configured with a priority of 110, which is higher than the default priority of 100. Since no priority is configured for Router_B, Router_A will become the active router.
The IP address of 10.0.0.3 will be established as the virtual IP address. A virtual MAC address will also be selected by the Cisco IOS from a range of addresses.
The “standby preempt” command allows the router to become active.
version 11.3
no service password-encryption
!
hostname Router_A
!
enable secret 5 $1$.s1R$iaEqZxLnYJo2QlZi8UNaO0
enable password
!
interface Ethernet0/0
  ip address 10.0.0.1 255.0.0.0
  no ip redirects
  standby 1 priority 110
  standby 1 preempt
  standby 1 ip 10.0.0.3
!
interface Serial0/0
  ip address 150.10.0.1 255.255.0.0
  no ip mroute-cache
!
interface TokenRing0/0
  no ip address
  shutdown
  ring-speed 16
!
interface FastEthernet1/0
  no ip address
  shutdown
!
router igrp 100
  network 10.0.0.0
  network 150.10.0.0
!
ip classless
no logging buffered
!
line con 0
  exec-timeout 0 0
line aux 0
line vty 0 4
  login
!
end
Figure 18.5  Configuration for Router_A
Current configuration:
!
version 11.2
!
hostname Router_B
!
interface Ethernet0
  ip address 10.0.0.2 255.0.0.0
  no ip redirects
  standby 1 preempt
  standby 1 ip 10.0.0.3
!
interface Ethernet1
  no ip address
  shutdown
!
interface Serial0
  ip address 192.20.30.1 255.255.255.0
!
interface Serial1
  no ip address
  shutdown
!
router igrp 100
  network 10.0.0.0
  network 192.20.30.0
!
line con 0
line aux 0
line vty 0 4
  login
!
end
Figure 18.6  Configuration for Router_B
Figures 18.7 and 18.8 illustrate a Windows 95 configuration of the workstation.
Workstation A will be configured with a default gateway that represents the virtual IP address.
Figure 18.7  Configuration for Workstation A
Figure 18.8  Configuration for Workstation A
Figure 18.9 shows the result of putting the e0/0 interface in “shut” mode.
Router_A(config)#int e0/0
Router_A(config-if)#shut
Router_A(config-if)#
%STANDBY-6-STATECHANGE: Standby: 1: Ethernet0/0 state Active     -> Init
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down
%LINK-5-CHANGED: Interface Ethernet0/0, changed state to administratively down
Figure 18.9  Router_B becomes Active
Figure 18.10 shows the result of putting the e0/0 interface in “no shut” mode.
Router_A(config-if)#no shut
Router_A(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
%LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
%STANDBY-6-STATECHANGE: Standby: 1: Ethernet0/0 state Listen     -> Active
Figure 18.10  Router_A returns to Active State
Figure 18.11 shows the result of a successful ping from Workstation A and the echo reply. The echo request was initiated from Workstation A to the fictitious IP address of the default gateway.
Router_B#debug ip icmp
ICMP packet debugging is on
Router_B#
ICMP: echo reply sent, src 10.0.0.3, dst 10.0.0.4
ICMP: echo reply sent, src 10.0.0.3, dst 10.0.0.4
ICMP: echo reply sent, src 10.0.0.3, dst 10.0.0.4
ICMP: echo reply sent, src 10.0.0.3, dst 10.0.0.4
Router_B#debug ip icmp
Figure 18.11  Ping Result

 


 
Books24x7.com, Inc © 2000 –  Feedback